package com.linkmcn.uaa.feign;


import com.linkmcn.uaa.entity.LoginInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("linkmcn-user")
public interface UserClient {

    /**
     * 使用用户名密码登录
     */
    @PostMapping("/login/loginWithUsernamePassword")
    LoginInfo loginWithUsernamePassword(@RequestParam String username);



    /**
     * 使用code登录
     */
    @PostMapping("/login/loginWithCode")
    LoginInfo loginWithCode(@RequestParam String code);


    /**
     * 验证码登陆
     *
     * @param username
     * @return
     */
    @PostMapping("/api/public/login/loginWithCaptcha.do")
    LoginInfo loginWithCaptcha(@RequestParam String username);
}
